package com.main.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author admin
 * @date 2019/05/20
 */
@Controller
@RequestMapping(value = "api")
@Api(tags = "model")
public class HelloController extends AbstractController{

    @RequestMapping(value = "/hello")
    @ApiOperation("hello")
    public String helloWord(Model model) {
        model.addAttribute("message", "Hello Word!");
        return "helloWord";
    }

    @RequestMapping(value = "/test")
    @ApiOperation("test")
    public String test() {
        logger.debug("test success");
        return "redirect:http://www.baidu.com";
    }


}
